<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Upgrade iRedMail from 1.6.8 to 1.7.0</title>
        <link rel="stylesheet" type="text/css" href="./css/markdown.css" />
    </head>
    <body>

    <div id="navigation">
    <a href="https://www.iredmail.org" target="_blank">
        <img alt="iRedMail web site"
             src="./images/logo-iredmail.png"
             style="vertical-align: middle; height: 30px;"
             />&nbsp;
        <span>iRedMail</span>
    </a>
    &nbsp;&nbsp;//&nbsp;&nbsp;<a href="./index.html">Document Index</a></div><h1 id="upgrade-iredmail-from-168-to-170">Upgrade iRedMail from 1.6.8 to 1.7.0</h1>
<div class="admonition attention">
<p class="admonition-title">Attention</p>
<p>Check out the on-premises, lightweight email archiving software developed by iRedMail team: <a href="https://spiderd.io/">Spider Email Archiver</a>.</p>
</div>
<div class="toc">
<ul>
<li><a href="#upgrade-iredmail-from-168-to-170">Upgrade iRedMail from 1.6.8 to 1.7.0</a><ul>
<li><a href="#changelog">ChangeLog</a></li>
<li><a href="#general-all-backends-should-apply-these-changes">General (All backends should apply these changes)</a><ul>
<li><a href="#update-etciredmail-release-with-new-iredmail-version-number">Update /etc/iredmail-release with new iRedMail version number</a></li>
<li><a href="#upgrade-roundcube-webmail-to-the-latest-stable-release-167">Upgrade Roundcube webmail to the latest stable release (1.6.7)</a></li>
<li><a href="#upgrade-sogo-to-latest-5100-and-add-required-new-parameter">Upgrade SOGo to latest 5.10.0 and add required new parameter</a></li>
<li><a href="#upgrade-mlmmjadmin-to-the-latest-stable-release-321">Upgrade mlmmjadmin to the latest stable release (3.2.1)</a></li>
<li><a href="#upgrade-iredapd-postfix-policy-server-to-the-latest-stable-release-560">Upgrade iRedAPD (Postfix policy server) to the latest stable release (5.6.0)</a></li>
<li><a href="#upgrade-iredadmin-open-source-edition-to-the-latest-stable-release-26">Upgrade iRedAdmin (open source edition) to the latest stable release (2.6)</a></li>
<li><a href="#upgrade-netdata-to-the-latest-stable-release-1462">Upgrade netdata to the latest stable release (1.46.2)</a></li>
<li><a href="#optional-disable-multi-threaded-database-reload-in-clamav">[OPTIONAL] Disable multi-threaded database reload in ClamAV</a></li>
</ul>
</li>
<li><a href="#for-mariadb-backend">For MariaDB backend</a><ul>
<li><a href="#store-enabeld-jail-names-in-sql-database">Store enabeld jail names in SQL database</a></li>
</ul>
</li>
<li><a href="#for-postgresql-backend">For PostgreSQL backend</a><ul>
<li><a href="#store-enabeld-jail-names-in-sql-database_1">Store enabeld jail names in SQL database</a></li>
<li><a href="#optional-track-user-last-login-time">[OPTIONAL] Track user last login time</a></li>
</ul>
</li>
<li><a href="#for-openldap-backend">For OpenLDAP backend</a><ul>
<li><a href="#store-enabeld-jail-names-in-sql-database_2">Store enabeld jail names in SQL database</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="admonition note">
<p class="admonition-title">Remote Upgrade Assistance</p>
<p>Check out our <a href="https://www.iredmail.org/support.html">remote upgrade support</a> if you need assistance.</p>
</div>
<h2 id="changelog">ChangeLog</h2>
<ul>
<li>July 17, 2024: initial publish.</li>
</ul>
<h2 id="general-all-backends-should-apply-these-changes">General (All backends should apply these changes)</h2>
<h3 id="update-etciredmail-release-with-new-iredmail-version-number">Update <code>/etc/iredmail-release</code> with new iRedMail version number</h3>
<p>iRedMail stores the release version in <code>/etc/iredmail-release</code> after
installation, it's recommended to update this file after you upgraded iRedMail,
so that you can know which version of iRedMail you're running. For example:</p>
<pre><code>1.7.0
</code></pre>
<h3 id="upgrade-roundcube-webmail-to-the-latest-stable-release-167">Upgrade Roundcube webmail to the latest stable release (1.6.7)</h3>
<div class="admonition warning">
<p class="admonition-title">CentOS 7: please stick to Roundcube 1.5.2</p>
<p><strong>It's time to leave your comfort zone and upgrade this server to at least
CentOS Stream 8 or <a href="https://docs.rockylinux.org/guides/migrate2rocky/">Rocky Linux 8</a>.</strong></p>
<p>If you're running CentOS 7, please upgrade to Roundcube 1.5.2 instead.
Roundcube 1.5.3 requires PHP-7, but CentOS 7 ships PHP-5.4 which is not
supported by Roundcube 1.5.3 and later releases, including 1.6.x.</p>
<p><strong>Unfortunately, Roundcube 1.5.2 does NOT contains multiple security fixes
which shipped in Roundcube 1.5.6 and 1.6.5.</strong></p>
</div>
<div class="admonition warning">
<p class="admonition-title">Ubuntu 18.04: please stick to Roundcube 1.5.7</p>
<p>Ubuntu 18.04 runs old php version, v1.5.6 contains the security fix too.
Anyway, please consider upgrading your OS to at least 20.04 LTS as soon as
possible.</p>
</div>
<ul>
<li><a href="https://github.com/roundcube/roundcubemail/wiki/Upgrade">Upgrade Roundcube</a>.</li>
</ul>
<h3 id="upgrade-sogo-to-latest-5100-and-add-required-new-parameter">Upgrade SOGo to latest 5.10.0 and add required new parameter</h3>
<p>SOGo v5.10.0 introduces a required new parameter <code>OCSAdminURL</code> in config file.
Please add this new parameter and upgrade SOGo to latest nightly build.</p>
<ul>
<li>Find parameter <code>OCSAclURL</code> in SOGo config file <code>/etc/sogo/sogo.conf</code> like below:</li>
</ul>
<pre><code>    OCSAclURL = &quot;mysql://sogo:SOVtHQXsnYOb3CqnYe5sH52fiYTvaYZT@127.0.0.1:3306/sogo/sogo_acl&quot;;
</code></pre>
<ul>
<li>Add new parameter <code>OCSAdminURL</code> right after <code>OCSAclURL</code> with same value, but
  replace the sql table name <code>sogo_acl</code> by <code>sogo_admin</code>:</li>
</ul>
<pre><code>    OCSAclURL = &quot;mysql://sogo:SOVtHQXsnYOb3CqnYe5sH52fiYTvaYZT@127.0.0.1:3306/sogo/sogo_acl&quot;;
    OCSAdminURL = &quot;mysql://sogo:SOVtHQXsnYOb3CqnYe5sH52fiYTvaYZT@127.0.0.1:3306/sogo/sogo_admin&quot;;
</code></pre>
<ul>
<li>Save your change and restart SOGo service.</li>
</ul>
<h3 id="upgrade-mlmmjadmin-to-the-latest-stable-release-321">Upgrade mlmmjadmin to the latest stable release (3.2.1)</h3>
<p>Please follow below tutorial to upgrade mlmmjadmin to the latest stable release:
<a href="./upgrade.mlmmjadmin.html">Upgrade mlmmjadmin to the latest stable release</a></p>
<h3 id="upgrade-iredapd-postfix-policy-server-to-the-latest-stable-release-560">Upgrade iRedAPD (Postfix policy server) to the latest stable release (5.6.0)</h3>
<p>Please follow below tutorial to upgrade iRedAPD to the latest stable release:
<a href="./upgrade.iredapd.html">Upgrade iRedAPD to the latest stable release</a></p>
<h3 id="upgrade-iredadmin-open-source-edition-to-the-latest-stable-release-26">Upgrade iRedAdmin (open source edition) to the latest stable release (2.6)</h3>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>It addresses 2 possible XSS vulnerabilities, please upgrade as soon as possible.</p>
</div>
<p>Please follow below tutorial to upgrade iRedAdmin to the latest stable release:
<a href="./migrate.or.upgrade.iredadmin.html">Upgrade iRedAdmin to the latest stable release</a>.</p>
<h3 id="upgrade-netdata-to-the-latest-stable-release-1462">Upgrade netdata to the latest stable release (1.46.2)</h3>
<p>If you have netdata installed, you can upgrade it by following this tutorial:
<a href="./upgrade.netdata.html">Upgrade netdata</a>.</p>
<h3 id="optional-disable-multi-threaded-database-reload-in-clamav">[OPTIONAL] Disable multi-threaded database reload in ClamAV</h3>
<p>Add this parameter in ClamAV daemon config file, then restart ClamAV daemon service.</p>
<ul>
<li>On RHEL/CentOS, it's <code>/etc/clamd.d/amavisd.conf</code>.</li>
<li>On Debian/Ubuntu, it's <code>/etc/clamav/clamd.conf</code>.</li>
<li>On FreeBSD, it's <code>/usr/local/etc/clamd.conf</code>.</li>
<li>On OpenBSD, it's <code>/etc/clamd.conf</code>.</li>
</ul>
<pre><code>ConcurrentDatabaseReload no
</code></pre>
<h2 id="for-mariadb-backend">For MariaDB backend</h2>
<h3 id="store-enabeld-jail-names-in-sql-database">Store enabeld jail names in SQL database</h3>
<div class="admonition attention">
<p class="admonition-title">Attention</p>
<p>This step is required if you configured Fail2ban to <a href="./fail2ban.sql.html">store banned IP
addresses in SQL database</a> for easier management on
iRedAdmin-Pro.</p>
</div>
<p>Copy and run shell commands below to implement this improvement:</p>
<pre><code># Create new SQL table 'fail2ban.jails' to store jail names:
wget -O /tmp/f2b.sql https://raw.githubusercontent.com/iredmail/iRedMail/1.7.0/update/1.7.0/fail2ban.mysql
mysql fail2ban &lt; /tmp/f2b.sql
rm -f /tmp/f2b.sql

# Replace action script:
wget -O /usr/local/bin/fail2ban_banned_db \
    https://raw.githubusercontent.com/iredmail/iRedMail/1.7.0/samples/fail2ban/bin/fail2ban_banned_db

# Replace action config file
wget -O /etc/fail2ban/action.d/banned_db.conf \
    https://raw.githubusercontent.com/iredmail/iRedMail/1.7.0/samples/fail2ban/action.d/banned_db.conf

# Restarting fail2ban service is required:
systemctl restart fail2ban
</code></pre>
<h2 id="for-postgresql-backend">For PostgreSQL backend</h2>
<h3 id="store-enabeld-jail-names-in-sql-database_1">Store enabeld jail names in SQL database</h3>
<div class="admonition attention">
<p class="admonition-title">Attention</p>
<p>This step is required if you configured Fail2ban to <a href="./fail2ban.sql.html">store banned IP
addresses in SQL database</a> for easier management on
iRedAdmin-Pro.</p>
</div>
<p>Copy and run shell commands below to implement this improvement:</p>
<pre><code># Create new SQL table 'fail2ban.jails' to store jail names:
wget -O /tmp/f2b.sql https://raw.githubusercontent.com/iredmail/iRedMail/master/update/1.7.0/fail2ban.pgsql
su - postgres -c &quot;psql -d fail2ban -c '\i /tmp/f2b.sql'&quot;
rm -f /tmp/f2b.sql

# Replace action script:
wget -O /usr/local/bin/fail2ban_banned_db \
    https://raw.githubusercontent.com/iredmail/iRedMail/1.7.0/samples/fail2ban/bin/fail2ban_banned_db

# Replace action config file
wget -O /etc/fail2ban/action.d/banned_db.conf \
    https://raw.githubusercontent.com/iredmail/iRedMail/1.7.0/samples/fail2ban/action.d/banned_db.conf

# Restarting fail2ban service is required:
systemctl restart fail2ban
</code></pre>
<h3 id="optional-track-user-last-login-time">[OPTIONAL] Track user last login time</h3>
<p>iRedMail supports tracking user last login time for MySQL/MariaDB/OpenLDAP
backends since iRedMail-1.2, but not PostgreSQL backend. It now finally comes.</p>
<p>This feature is offered by Dovecot, and is available in Dovecot-2.3.16 and
later version, so it's available on:</p>
<ul>
<li>Debian 12</li>
<li>Ubuntu 22.04 and later releases</li>
<li>CentOS / Rocky / AlmaLinux 9</li>
<li>OpenBSD 7.3 and later releases</li>
</ul>
<p>Please follow this tutorial to implement it:</p>
<ul>
<li><a href="https://docs.iredmail.org/track.user.last.login.html">Track user last login time</a></li>
</ul>
<h2 id="for-openldap-backend">For OpenLDAP backend</h2>
<h3 id="store-enabeld-jail-names-in-sql-database_2">Store enabeld jail names in SQL database</h3>
<div class="admonition attention">
<p class="admonition-title">Attention</p>
<p>This step is required if you configured Fail2ban to <a href="./fail2ban.sql.html">store banned IP
addresses in SQL database</a> for easier management on
iRedAdmin-Pro.</p>
</div>
<p>Copy and run shell commands below to implement this improvement:</p>
<pre><code># Create new SQL table 'fail2ban.jails' to store jail names:
wget -O /tmp/f2b.sql https://raw.githubusercontent.com/iredmail/iRedMail/1.7.0/update/1.7.0/fail2ban.mysql
mysql fail2ban &lt; /tmp/f2b.sql
rm -f /tmp/f2b.sql

# Replace action script:
wget -O /usr/local/bin/fail2ban_banned_db \
    https://raw.githubusercontent.com/iredmail/iRedMail/1.7.0/samples/fail2ban/bin/fail2ban_banned_db

# Replace action config file
wget -O /etc/fail2ban/action.d/banned_db.conf \
    https://raw.githubusercontent.com/iredmail/iRedMail/1.7.0/samples/fail2ban/action.d/banned_db.conf

# Restarting fail2ban service is required:
systemctl restart fail2ban
</code></pre><div class="footer">
    <p style="text-align: center; color: grey;">All documents are available in <a href="https://github.com/iredmail/docs/">GitHub repository</a>, and published under <a href="http://creativecommons.org/licenses/by-nd/3.0/us/" target="_blank">Creative Commons</a> license. You can <a href="https://github.com/iredmail/docs/archive/master.zip">download the latest version</a> for offline reading. If you found something wrong, please do <a href="https://www.iredmail.org/contact.html">contact us</a> to fix it.</p>
</div></body></html>